<template>
	<view>
		<u-sticky bgColor="#F3F5F7" offsetTop="0" customNavHeight="0">
			<u-status-bar></u-status-bar>
			<view class="top">
				<u-tabs :list="list4" lineWidth="44rpx" lineHeight='14rpx' :lineColor="`url(${lineBg}) 100% 100%`"
					:activeStyle="{
				            color: '#000000',
				            fontWeight: 'bold',
				            transform: 'scale(1.125)'
				        }" :inactiveStyle="{
				            color: '#666666',
				            transform: 'scale(1)'
				        }" itemStyle="padding-left: 40rpx; padding-right: 40rpx; height: 98rpx;font-size:32rpx;" @click="clicktab"
					:current='cur'>
				</u-tabs>
				<image src="/static/home/ss.png" class="top__ss" @click="navto('/pages/home/searchpage')" mode=""></image>
			</view>
		</u-sticky>
		<view class="con">
			<view class="tab u-flex u-flex-y-center u-flex-between">
				<view class="tab__item" v-for="(item,index) in tablist" :key="index" @click="navto(item.url,item.type)">
					<image :src="'/static/home/'+item.icon+'.png'" class="tab__item__icon" mode=""></image>
					<image :src="'/static/home/'+item.text+'.png'" class="tab__item__text" mode="heightFix"></image>
				</view>
			</view>
			<view class="con__box">
				<view class="con__box__title">
					推荐
				</view>
				<view class="con__box__tjlist">
					<view class="con__box__tjlist__item" v-for="(item,index) in 4" :key="index" @click="navto('/pages/home/shudetail')">
						<image src="/static/pic.png" class="con__box__tjlist__item__pic" mode="aspectFill"></image>
						<view class="con__box__tjlist__item__right">
							<view class="">
								<view class="con__box__tjlist__item__name">
									浴火重生:绯色无疆
								</view>
								<view class="con__box__tjlist__item__jj">
									浴火重生，纵横官场，美女老师，芳邻，校花，多情女老总….尽在掌控之中。
								</view>
							</view>
							<view class="u-flex u-flex-y-center u-flex-between con__box__tjlist__item__zz">
								<view class="">
									会飞的鱼
								</view>
								<view class="">
									都市言情·完本
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 完本 -->
			<view class="con__box" style="padding-bottom: 0;">
				<view class="con__box__title">
					完本
				</view>
				<view class="con__box__wblist u-flex-wrap">
					<view class="con__box__wblist__item" v-for="(item,index) in 4" :key="index" @click="navto('/pages/home/shudetail')">
						<image src="/static/pic.png" class="con__box__wblist__item__pic" mode="aspectFill"></image>
						<view class="con__box__wblist__item__name">
							抗日之幽灵
						</view>
						<view class="con__box__wblist__item__zz">
							爱虾的鱼
						</view>
					</view>
				</view>
			</view>
			<!-- 精品 -->
			<view class="con__box" style="padding-bottom: 24rpx;">
				<view class="con__box__title">
					精品
				</view>
				<view class="con__box__wblist u-flex-wrap">
					<view class="con__box__wblist__item" v-for="(item,index) in 8" :key="index" @click="navto('/pages/home/shudetail')">
						<image src="/static/pic.png" class="con__box__wblist__item__pic" mode="aspectFill"></image>
						<view class="con__box__wblist__item__name">
							抗日之幽灵
						</view>
						<view class="con__box__wblist__item__zz">
							爱虾的鱼
						</view>
					</view>
				</view>
			</view>
			<!-- 排行榜 -->
			<phb :list="phblist"></phb>
			
		</view>
		<!-- 近期阅读 -->
		<view class="footeryd">
			<image src="/static/home/cha.png" class="footeryd__cha" mode=""></image>
			<view class="footeryd__center">
				<view class="footeryd__name">
					妙手神农
				</view>
				<view class="footeryd__zj">
					上次看到第1章偷窥
				</view>
			</view>
			<view class="footeryd__btn" @click="navto('/pages/home/shudetail')">
				点击阅读(6)
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				phblist:[{},{},{},{}],
				cur: 0,
				list4: [{
					name: '男频'
				}, {
					name: '女频',
				}, ],
				lineBg: this.$store.state.lineBg,
				tablist: [{
						icon: 'phb',
						text: "phbt",
						url: '/pages/home/phb',
						type:0
					},
					{
						icon: 'ydjl',
						text: "ydjlt",
						url: '/pages/personal/zuijin',
						type:0
					},
					{
						icon: 'mrrw',
						text: "mrrwt",
						url: '/pages/home/mrrw',
						type:0
					},
				]
			};
		},
		methods: {
			clicktab() {

			}
		}
	}
</script>

<style lang="scss">
	.top {
		height: 98rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding-right: 24rpx;

		&__ss {
			width: 52rpx;
			height: 52rpx;
		}
	}

	.con {
		padding: 24rpx;

		.tab {
			&__item {
				width: 218rpx;
				height: 136rpx;
				background: #FFFFFF;
				border-radius: 12rpx 12rpx 12rpx 12rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;
				flex-direction: column;
				padding: 30rpx 0;

				&__icon {
					width: 96rpx;
					height: 96rpx;
				}

				&__text {
					height: 26rpx;
				}
			}

		}

		&__box {
			padding: 24rpx;
			background-color: #fff;
			border-radius: 24rpx;
			margin-top: 24rpx;
			&__title {
				font-family: PingFang SC, PingFang SC;
				font-weight: bold;
				font-size: 36rpx;
				color: #000000;
				line-height: 50rpx;
				margin-bottom: 24rpx;
			}

			&__tjlist {
				&__item {
					display: flex;
					align-items: center;
					margin-bottom: 32rpx;
					&__pic {
						width: 152rpx;
						height: 200rpx;
						border-radius: 8rpx 8rpx 8rpx 8rpx;
						margin-right: 16rpx;
					}

					&__right {
						height: 200rpx;
						display: flex;
						flex-direction: column;
						justify-content: space-between;
						
					}

					&__name {
						width: 487rpx;
						font-family: PingFang SC, PingFang SC;
						font-weight: bold;
						font-size: 32rpx;
						color: #000000;
						line-height: 44rpx;
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: nowrap;
						margin-bottom: 8rpx;
					}

					&__jj {
						width: 487rpx;
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 26rpx;
						color: #666666;
						line-height: 36rpx;
						word-break: break-all;
						text-overflow: ellipsis;
						display: -webkit-box;
						-webkit-box-orient: vertical;
						-webkit-line-clamp: 2;
						/* 这里是超出几行省略 */
						overflow: hidden;
					}
					&__zz{
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 24rpx;
						color: #999999;
						line-height: 34rpx;
					}
				}
				:last-child{
					margin-bottom: 0;
				}
			}
			&__wblist{
				display: flex;
				align-items: center;
				justify-content: space-between;
				&__item{
					width: 152rpx;
					margin-bottom: 24rpx;
					&__pic{
						width: 152rpx;
						height: 200rpx;
						border-radius: 8rpx 8rpx 8rpx 8rpx;
					}
					&__name{
						width: 152rpx;
						font-family: PingFang SC, PingFang SC;
						font-weight: bold;
						font-size: 30rpx;
						color: #000000;
						line-height: 44rpx;
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: nowrap;
					}
					&__zz{
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 24rpx;
						color: #999999;
						line-height: 34rpx;
					}
				}
			}
		}
	}
	.footeryd{
		width: 654rpx;
		background: rgba(0,0,0,0.7);
		border-radius: 12rpx 12rpx 12rpx 12rpx;
		padding:24rpx;
		display: flex;
		align-items: center;
		position: fixed;
		bottom:24rpx;
		/* #ifndef APP */
		bottom: calc(50px + 24rpx);
		/* #endif */
		
		left: 24rpx;
		z-index: 6;
		&__cha{
			width: 32rpx;
			height: 32rpx;
			margin-right: 16rpx;
		}
		&__center{
			// justify-self: flex-start;
			flex: 1;
		}
		&__name{
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 32rpx;
			color: #FFFFFF;
			line-height: 44rpx;
		}
		&__zj{
			font-family: PingFang SC, PingFang SC;
			font-weight: 400;
			font-size: 24rpx;
			color: #FFFFFF;
			line-height: 34rpx;
		}
		&__btn{
			width: fit-content;
			line-height: 48rpx;
			padding: 0 16rpx;
			background: #51CAEF;
			border-radius: 24rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 400;
			font-size: 28rpx;
			color: #FFFFFF;
		}
	}
</style>